﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Media;

namespace FileSysExp.Core
{
    public abstract class FileSystemItemBase : ViewModelBase, IFileSysItem
    {
        protected string _Name;
        public string Name
        {
            get
            {
                return _Name;
            }
            set
            {
                _Name = value;
                RaisePropertyChanged("Name");
            }
        }
        protected string _ShortName;
        public string ShortName
        {
            get
            {
                return _ShortName;
            }
            set
            {
                _ShortName = value;
                RaisePropertyChanged("ShortName");
            }
        }
        protected string _ModifiedDate;
        public string ModifiedDate
        {
            get
            {
                return _ModifiedDate;
            }
            set
            {
                _ModifiedDate = value;
                RaisePropertyChanged("ModifiedDate");
            }
        }
        protected string _Size;
        public string Size
        {
            get
            {
                return _Size;
            }
            set
            {
                _Size = value;
                RaisePropertyChanged("Size");
            }
        }
        private ImageSource _Icon;
        public ImageSource Icon
        {
            get
            {
                return _Icon;
            }
            set
            {
                _Icon = value;
                RaisePropertyChanged("Icon");
            }
        }

        public virtual void GetChildren(bool includeFiles = false)
        {
           
        }
        private  List<IFileSysItem> _Children;
        public List<IFileSysItem> Children
        {
            get
            {
                return _Children;
            }
            set
            {
                _Children = value;
                RaisePropertyChanged("Children");
            }
        }

        public IFileSysItem Clone()
        {
            return this.MemberwiseClone() as IFileSysItem;
        }
    }
}
